<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>slider切换</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0;
            overflow: hidden;
        }
        .main{
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        .main-img{
            width: 100%;
            height: 100%;
        }
        .main-img img{
            position: absolute;
            min-width: 100%;
        }
        .menu-img{
            position: fixed;
            text-align: center;
            width: 100%;
            bottom: 0px;
            z-index: 10;
        }
        .menu-img img,.menu-img a{
            width: 180px;
            height: 130px;
        }
        #img1:target{
            z-index: 1;
            animation: ease-out 0.5s anim-in-1;
        }
        #img2:target{
            z-index: 1;
            animation: ease-out 0.5s anim-in-2;
        }
        #img3:target{
            z-index: 1;
            animation: ease-in 1s anim-in-3;
        }
        #img4:target{
            z-index: 1;
            animation: ease-out 1s anim-in-4;
        }
        #img5:target{
            z-index: 1;
            animation: ease-in-out 0.7s anim-in-5;
        }
        @keyframes anim-in-1{
            from{
                left:-500px;
                opacity:0.7;
            }
            to{
                left:0;
                opacity: 1;
            }
        }
        @keyframes anim-in-2{
            from{
                top:350px;
                opacity:0.7;
            }
            to{
                top:0;
                opacity: 1;
            }
        }
        @keyframes anim-in-3{
            from{
                transform:scale(0.1);
                opacity:0.7;
            }
            to{
                transform:scale(1.0);
                opacity: 1;
            }
        }
        @keyframes anim-in-4{
            from{
                transform:scale(2.0);
                opacity:0.7;
            }
            to{
                transform:scale(1.0);
                opacity: 1;
            }
        }
        @keyframes anim-in-5{
            from{
                transform:rotate(-360deg);
                transform:scale(0.1);
                opacity:0.7;
            }
            to{
                transform:rotate(0deg);
                transform:scale(1);
                opacity: 1;
            }
        }
    </style>
</head>
<body>
<div class="main">
    <div class="main-img">
        <img id="img1" src="https://placem.at/places?w=1280&h=720&random=2">
        <img id="img2" src="https://placem.at/places?w=1280&h=720&random=3">
        <img id="img3" src="https://placem.at/places?w=1280&h=720&random=6">
        <img id="img4" src="https://placem.at/places?w=1280&h=720&random=7">
        <img id="img5" src="https://placem.at/places?w=1280&h=720&random=9">
    </div>
    <div class="menu-img">
        <a href="#img1"><img src="https://placem.at/places?w=1280&h=720&random=2"></a>
        <a href="#img2"><img src="https://placem.at/places?w=1280&h=720&random=3"></a>
        <a href="#img3"><img src="https://placem.at/places?w=1280&h=720&random=6"></a>
        <a href="#img4"><img src="https://placem.at/places?w=1280&h=720&random=7"></a>
        <a href="#img5"><img src="https://placem.at/places?w=1280&h=720&random=9"></a>
    </div>
</div>
</body>
</html>
